﻿Public Partial Class Principal
    Inherits System.Web.UI.MasterPage


    Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Try
            Me.LabelUsuario.Text = Session("Usuario").ToString() 'Convierto a string el objeto guardado porque por defecto lo guarda como Object
        Catch ex As Exception
            Session.Add("exError", ex)
            Response.Redirect("ManejarError.aspx")
        End Try
    End Sub

    Private Sub LinkButtonSalir_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LinkButtonSalir.Click
        Try
            Session.Remove("Apellido")
            Response.Redirect("Login.aspx")
        Catch ex As Exception
            Session.Add("exError", ex)
            Response.Redirect("ManejarError.aspx")
        End Try
    End Sub
End Class